<?php
/**
 * User: ppjun378
 * Data: 2019/01/30
 * Time: 17:00
 */

namespace App\Api\Controllers;

class RnakSalarysController extends BaseController
{
    public function index()
    {

    }

    /**
     * 获取数据
     * @return mixed
     * @author ppjun378 <ppjun378@foxmail.com>
     */
    public function getinfo(Request $request)
    {
        $result = RankSalarysService::dataList($request);
        return $result;
    }

    /**
     * 添加/更新
     * @param Request $request
     * @return Illuminate\Http\JsonResponse
     * @author ppjun378 <ppjun378@foxmail.com>
     */
    public function store(Response $request)
    {
        $id = RankSalarysService::store($request);
        if ($id) {
            return $this->success();
        } else {
            return $this->error();
        }

    }

    /**
     * 删除
     * @param Request $request
     * @return Illuminate\Http\JsonResponse
     * @author ppjun378 <ppjun378@foxmail.com>
     */
    public function destory(Request $request)
    {
        $request = RankSalarysService::destory($request);
        if($result){
            return $this->success();
        }else{
            return $this->error();
        }
    }

}
